using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace PickGold
{
	/// <summary>
	/// 
	/// </summary>
	/// <typeparam name="TYPE"></typeparam>
	public class Timeslice<TYPE> : MarshalByRefObject
	{
		/// <summary>
		/// 
		/// </summary>
		protected TYPE _Value;
		/// <summary>
		/// 
		/// </summary>
		protected DateTime _LastGet;
		/// <summary>
		/// 
		/// </summary>
		protected DateTime _LastSet;

		/// <summary>
		/// 
		/// </summary>
		public Timeslice()
		{
			this._Value = default(TYPE);
			this._LastSet = DateTime.MinValue;
			this._LastGet = DateTime.MinValue;
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="value"></param>
		public Timeslice(TYPE value) : this()
		{
			this.Value = value;
		}

		/// <summary>
		/// 
		/// </summary>
		public TYPE Value
		{
			set
			{
				this._LastSet = DateTime.Now;
				this._Value = value;
			}
			get
			{
				this._LastGet = DateTime.Now;
				return this._Value;
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public DateTime LastSet
		{
			get
			{
				return this._LastSet;
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public DateTime LastGet
		{
			get
			{
				return this._LastGet;
			}
		}
		//
	}

	/// <summary>
	/// 
	/// </summary>
	public class Timeslice : Timeslice<object>
	{
		/// <summary>
		/// 
		/// </summary>
		public Timeslice() : base() { }

		/// <summary>
		/// 
		/// </summary>
		/// <param name="value"></param>
		public Timeslice(object value) : base(value) { }
	}
}
//
